package com.alibaba.citrus.ots.sales.plan.api.setting.contract;

import com.alibaba.citrus.ots.sales.plan.sdo.ContractSDO;
import com.alibaba.lattice2.epoch.meshflow.model.annotation.MeshFlowService;
import com.alibaba.lattice2.epoch.sdk.model.Result;
import com.epoch.app.bcots.sales_plan.SendMessageChangeCategoryInfo;

import java.util.List;

/**
 * @author wangyibing
 */
@MeshFlowService(apps = {"bc_ots"}, name = "contractWriteService")
public interface ContractWriteService {

    /**
     * 批量新增合同量
     *
     * @param createContractRequestList
     * @return
     */
    Result<Integer> batchCreateContract(List<ContractSDO> createContractRequestList);

    /**
     * 编辑合同量
     *
     * @param editContractRequest
     * @return
     */
    Result<Integer> editContract(ContractSDO editContractRequest);

    /**
     * 汇总合同量
     *
     * @return
     */
    Result<Boolean> summaryContract();

    /**
     * 按年汇总
     * @param year
     * @return
     */
    Result<Boolean> summaryContractByYear(String year);

    /**
     * 编辑客户合同量
     *
     * @param editContractRequest
     * @return
     */
    Result<Integer> editCustomerContract(ContractSDO editContractRequest);

    /**
     * 消费客户地址变更信息，同步修改由于地址变更引起的其他变更（合同量和计划明细）
     *
     * @return
     */
    Result<Boolean> consumeCustomerAddressToCollect(String message);

    /**
     * 货品类目变更消息发送
     *
     * @return
     */
    Result<Boolean> sendMessageChangeCategory(SendMessageChangeCategoryInfo sendMessageChangeCategoryInfo);

    /**
     * 消费货品类目变更，同步修改由于货品类目变更引起的其他变更（合同量和计划明细）
     *
     * @return
     */
    Result<Boolean> consumeScItemCategoryToCollect(String message);


}
